package gw.com.jni.library.terminal;

/**
 * 协议常量，跟jni连接的一些协议命令和回调命令
 */
public class GTSConst {

    public static final String LANG_ZH_TW = "zh_TW";
    public static final String LANG_ZH_CN = "zh_CN";

    /**
     * 登录回包
     */
    public static final int REPLY_LOGIN_RESULT = 1000;
    public static final int REPLY_DICT_LIST = 1100;//字典

    public static final int REPLY_POSTION_LIST = 2001;
    public static final int REPLY_POSTION_UPDATE = 2002;
    public static final int REPLY_POSTION_ADD = 2003;
    public static final int REPLY_POSTION_DELETE = 2004;
    public static final int REPLY_POSTION_UPDATELIST = 2005;

    public static final int REPLY_DEAL_LIST = 3001;
    public static final int REPLY_DEAL_ADD = 3003;
    public static final int REPLY_WIN_LIST = 3004;
    public static final int REPLY_WIN_ADD = 3005;

    public static final int REPLY_ORDER_LIST = 4001;
    public static final int REPLY_ORDER_UPDATE = 4002;
    public static final int REPLY_ORDER_ADD = 4003;
    public static final int REPLY_ORDER_CANCEL = 4004;
    public static final int REPLY_ORDER_UPDATELIST = 4005;
    public static final int REPLY_ORDER_DELETE = 4006;

    public static final int REPLY_SYMBOL_LIST = 5001;
    public static final int REPLY_SYMBOL_UPDATE = 5002;
    public static final int REPLY_SYMBOL_ADD = 5003;
    public static final int REPLY_SYMBOL_DELETE = 5004;
    public static final int REPLY_SYMBOL_ALLLIST = 5005; // 所有产品信息列表
    public static final int REPLY_SYMBOL_TICK_UPDATE = 5006; // 产品行情报价更新


    public static final int REPLY_ACCOUNT_UPDATE = 6002;
    public static final int REPLY_ACCOUNT_ADD = 6003;

    public static final int REPLY_ORDER_SUCCESS = 7000;
    public static final int REPLY_ORDER_FAILED = 7001;

    public static final int REPLY_QLOGIN_STATE = 8000;  //行情连接状态
    public static final int REPLY_TLOGIN_STATE = 8001;  //交易连接状态
    public static final int REPLY_NETWORK_STATE = 8005;  // 网络状态 uNotification = 0行情，1交易，ivalue = 0标识网络正在重连

    public static final int REPLY_MARGIN_UPDATE = 13000;    // 层级保证金有更新

    public static final int REPLY_KLINEDATA_LIST = 10001;        // K线数据
    public static final int REPLY_UPTRENDDATA_LIST = 10002;        // 分时图数据;
    public static final int REPLY_UPTRENDDATA_NEXTDAY = 10003;        // 分时图数据最后一根线更新到达第二个交易日
    public static final int REPLY_MSG_GETINDICATOR = 12000;        // 可以获取指标数据了，异步通知保证线程安全性，收到这个消息的时候才去调用获取指标公式，其他不变
    public static final int REPLY_KLINETICK_UPDATE = 12001;     // K线数据最后一根线处理
    public static final int REPLY_UPTRENDTICK_UPDATE = 12002;     // 分时数据最后一根线处理

    // HTTP Response，直接将json字符串传给UI层
    public static final int REPLY_HTTP_UPDATE = 20001;    // 返回升级
    public static final int REPLY_HTTP_RGS = 20002;    // 返回报表单点登录的URL
    public static final int REPLY_HTTP_UPDATE_PASS = 20003;    // 修改密码
    public static final int REPLY_HTTP_RESET_PASS = 20004;    // 忘记密码
    public static final int REPLY_HTTP_NEWS_LIST = 20005;    // 资讯列表
    public static final int REPLY_HTTP_NOTIFY_LIST = 20006;    // 消息中心
    public static final int REPLY_HTTP_NOTIFY_DETAIL = 20007;    // 消息详情
    public static final int REPLY_HTTP_NORMALREQ = 20009;    //配置中心通用接口
    public static final int REPLY_MOBILE_INFO = 20011;    // 手机号码

    public static final String REPLY_STATUS_FORCELOGIN = "REPLY_STATUS_FORCELOGIN"; //强制登出通知
    public static final String REPLY_STATUS_PROGRESS = "REPLY_STATUS_PROGRESS"; //各界面加载圈显示状态
    public static final String REPLY_RFRESH_ADS = "REPLY_RFRESH_ADS"; //各界面广告显示刷新
    public static final String REPLY_SWITCH_ACCOUNT = "REPLY_SWITCH_ACCOUNT"; //切换账号时通知刷新行情界面
    public static final String REPLY_ACCOUNT_IS_ACTIVE = "REPLY_ACCOUNT_IS_ACTIVE"; // 账号 Active 或 NotActive 状态获取成功
    public static final String REPLY_SWITCH_TABLE_HEADER = "REPLY_SWITCH_TABLE_HEADER";//行情右上角的切換按鈕，切換表头
    public static final String REPLY_SWITCH_QUOTE_EDIT_BTN = "REPLY_SWITCH_QUOTE_EDIT_BTN";//行情左上角的编辑按钮
    public static final String REPLY_SWITCH_LOGIN_TYPE = "REPLY_SWITCH_LOGIN_TYPE";//登陆状态切换
    public static final String REPLY_MARQUEE_CLOSE = "REPLY_MARQUEE_CLOSE"; //跑马灯关闭
    /**
     * 获取token类型key
     */
    public final static String REPLY_TYPE_GET_TOKEN = "REPLY_TYPE_GET_TOKEN";
    /**
     * 绑定模拟账户,及获取手机号绑定的账号列表通知
     */
    public final static String REPLY_TYPE_BINDCUSTOMER = "REPLY_TYPE_BINDCUSTOMER";
    /**
     * 配置中心获取账号相关信息
     */
    public final static String REPLY_TYPE_GET_CUSTOMER = "REPLY_TYPE_GET_CUSTOMER";
    /**
     * 自选操作，添加或者取消
     */
    public final static String REPLY_QUOTE_SELF = "REPLY_QUOTE_SELF";
    /**
     * 用户银行卡列表
     */
    public final static String NORMALREQ_TYPE_GET_BANK_INFO = "NORMALREQ_TYPE_GET_BANK_INFO";
    /**
     * 用户银行卡资料
     */
    public final static String NORMALREQ_TYPE_GET_BANK_CARD_INFO = "NORMALREQ_TYPE_GET_BANK_CARD_INFO";
    // 升级弹窗之后，再显示首页弹窗广告
    public final static String REPLY_POP_ADS_AFTER_UGPRADE = "REPLY_POP_ADS_AFTER_UGPRADE";
    // 首次安装的设备上，第一次将自选清空时，需要通知列表更新数据
    public final static String REPLY_POP_REFRESH_ON_FIRST_INSTALL = "REPLY_POP_REFRESH_ON_FIRST_INSTALL";


    /**
     * 除自选以外全部板块产品
     */
    public final static int ZONE_TYPE_ALL = 15;
    /**
     * 贵金属
     */
    public final static int ZONE_TYPE_PM = 1;
    /**
     * 外汇
     */
    public final static int ZONE_TYPE_FX = 2;
    /**
     * 参考
     */
    public final static int ZONE_TYPE_REF = 3;
    /**
     * 原油
     */
    public final static int ZONE_TYPE_OIL = 4;
    /**
     * 指数
     */
    public final static int ZONE_TYPE_INDEX = 5;
    /**
     * 比特币
     */
    public final static int ZONE_TYPE_BTC = 6;
    /**
     * 自选
     */
    public final static int ZONE_TYPE_SELF = 14;

    /**
     * 美元人民币code
     */
    public final static int CNY_CODE = 3224113;

    // ********************* json key值宏定义 ********************* //
    public final static String JSON_KEY_MAX_VOLUMES = "Volumes_max";                //持仓最大手数
    public final static String JSON_KEY_MAX_ORDER = "Order_max";                //持仓最大笔数
    public final static String JSON_KEY_PRODUCT_NAME = "Product_wp";                //产品带路径的名称
    public final static String JSON_KEY_CONTRACTSIZE = "ContractSize";                //合约手数
    public final static String JSON_KEY_TRADE_SEQ = "Seq";                        //下单时标识下单类型，市价开仓，平仓等
    public final static String JSON_KEY_NAME = "Name";                // 账户名
    public final static String JSON_KEY_PHONE = "PhoneNO";                // 账户名关联手机号
    public final static String JSON_KEY_TYPE = "Type";                // 账户类别  （这个要改 涉及简繁体  AccountTypeUSD  CNY 直接传过来）
    public final static String JSON_KEY_PROFIT = "Profit";                //盈亏 持仓的盈亏 盈亏列表的盈亏 账户的盈亏
    public final static String JSON_KEY_AVAILABLE = "Available";                 // 可用资金
    public final static String JSON_KEY_BALANCE = "Balance";               // 余额
    public final static String JSON_KEY_NETWORTH = "Networth";                // 净值
    public final static String JSON_KEY_OCCUPY = "Occupy";                // 占用保证金
    public final static String JSON_KEY_MARGINLEVEL = "MarginLevel";               // 按金水平
    public final static String JSON_KEY_MARGINONOFF = "MarginONOFF";                // 层级保证金开关
    public final static String JSON_KEY_FORCELEVEL = "ForceLevel";                // 强制平仓点
    public final static String JSON_KEY_VALID = "Valid";                // 可用状态
    public final static String JSON_KEY_PROFITSTATE = "ProfitState";               // 盈亏状态，-1跌 0平 1涨
    public final static String JSON_KEY_NETWORTHSTATE = "NetworthState";                // /**净值状态，-1跌 0平 1涨*/
    public final static String JSON_KEY_LASTLOGINACTID = "LastLoginAccountId";        // 最终登录账号的ID
    public final static String JSON_KEY_ID = "Id";                //各种单号（持仓单号，挂单单号，成交单号）
    public final static String JSON_KEY_POSID = "PosId";                //// 当日成交中的PosId,持仓单号
    public final static String JSON_KEY_ORDERID = "OrderId";                //当日成交中的OrderId
    public final static String JSON_KEY_ORDERTYPE = "OrderType";                // 订单类型
    public final static String JSON_KEY_CODEMIDDLE = "CodeMiddle";                // 交叉盘时的中间产品编码
    public final static String JSON_KEY_SYMBOLNAMEGB = "SymbolNameGB";                // 简体产品名称
    public final static String JSON_KEY_SYMBOLNAMEBIG = "SymbolNameBIG";                // 繁体产品名称
    public final static String JSON_KEY_VOLUME = "Volume";                // 数量
    public final static String JSON_KEY_DIRECTION = "Direction";                // 方向
    public final static String JSON_KEY_OPENPRICE = "OpenPrice";                // 开盘价 开仓价
    public final static String JSON_KEY_CLOSEPRICE = "ClosePrice";                // 开盘价 平仓价,tick报价中的作收价
    public final static String JSON_KEY_CLOSESTATE = "CloseState";                // 平仓价状态，-1跌 0平 1涨
    public final static String JSON_KEY_ZOOMRULE = "ZoomRule";                // 放大规则	4#2  从左边开始算起，第4位开始变大，连续变大二位小数
    public final static String JSON_KEY_INTEREST = "Interest";                // 利息
    public final static String JSON_KEY_COMMISSION = "Commission";                // 佣金/点差回赠
    public final static String JSON_KEY_OPENMARGINRATE = "OpenMarginRate";            // 开仓时汇率
    public final static String JSON_KEY_STOPLOSS = "StopLoss";                //止损价格
    public final static String JSON_KEY_STOPPROFIT = "StopProfit";               //止盈价格
    public final static String JSON_KEY_TIME = "Time";                //时间
    public final static String JSON_KEY_POS_UPDATETIME = "Pos_Update_Time";        //止损止盈时间
    public final static String JSON_KEY_BUYPRICE = "BuyPrice";                //买价
    public final static String JSON_KEY_SELLPRICE = "SellPrice";                //卖价
    public final static String JSON_KEY_STOPLOSSSTATE = "StopLossState";                // 止损价与当前价的价差是否超出20个点，超出则高亮显示 0未超出 -1超出		移动端特有
    public final static String JSON_KEY_STOPPROFITSTATE = "StopProfitState";           // 止盈价与当前价的价差是否超出20个点，超出则高亮显示 0未超出 -1超出		移动端特有
    public final static String JSON_KEY_ORDERPRICESTATE = "OrderPriceState";                           // 挂单价格的高亮标识
    public final static String JSON_KEY_DEFAULTOT = "Defaultlot";                //默认手数
    public final static String JSON_KEY_VOLUMESMIN = "VolumesMin_";                //最小手數
    public final static String JSON_KEY_VOLUMESMAX = "VolumesMax_";                //最大手數
    public final static String JSON_KEY_VOLUMESSTEP = "VolumesStep_";                //手数步长
    public final static String JSON_KEY_PRICESTEP = "PriceStep";                //价格步长次方数    比如 0.01 就是 2
    public final static String JSON_KEY_DIGITS = "Digits_";                //小数位数
    public final static String JSON_KEY_MINPIP = "MinPIP";                //以点数算的左区间   例  1000/大点比率
    public final static String JSON_KEY_MAXPIP = "MaxPIP";                //以点数算的右区间
    public final static String JSON_KEY_MINPRICE = "MinPrice";                //以价格算的左区间   例  1000/大点比率
    public final static String JSON_KEY_MAXPRICE = "MaxPrice";                //以价格算的右区间

    public final static String JSON_KEY_TRADESTATE = "TradeState";                //交易类型
    public final static String JSON_KEY_EXPIRETYPE = "ExpireType";                //有效期
    public final static String JSON_KEY_USEDIP = "UseDip";                //是否使用点数
    public final static String JSON_KEY_ORDERPRICE = "OrderPrice";                //挂单中的 挂单价格
    public final static String JSON_KEY_RANGE = "Range";                //最大偏移
    public final static String JSON_KEY_CODEID = "CodeId";                //行情中的7位数产品编码
    public final static String JSON_KEY_CODEID_STR = "CodeId_str";                //行情中的7位数产品编码  转化为二进制，然后通过二进制每8位为一组转成ASCII的字符串 得到一个三位数的数字字符串
    public final static String JSON_KEY_ZONE = "Zone";                //产品版块
    public final static String JSON_KEY_ISSELECTED = "IsSelf";                // 是否自选产品 1是 0不是 （为兼容性容错性 对接模型不设置bool类型）
    public final static String JSON_KEY_CURPRICESTATE = "CurPriceState";                // 颜色值  -1跌 0平 1涨
    public final static String JSON_KEY_BUYPRICESTATE = "BuyPriceState";            // 颜色值  -1跌 0平 1涨
    public final static String JSON_KEY_SELLPRICESTATE = "SellPriceState";            // 颜色值  -1跌 0平 1涨
    public final static String JSON_KEY_HIGHPRICESTATE = "HighPriceState";            // 颜色值  -1跌 0平 1涨
    public final static String JSON_KEY_LOWPRICESTATE = "LowPriceState";            // 颜色值  -1跌 0平 1涨
    public final static String JSON_KEY_OPENPRICESTATE = "OpenPriceState";            // 颜色值  -1跌 0平 1涨

    public final static String JSON_KEY_CURPRICEBGSTATE = "CurPriceBgState";            // 颜色值  -1跌 0平 1涨
    public final static String JSON_KEY_CURPRICEARRAW = "CurPriceArraw";            // 是否需要箭头，默认0需要，1不需要
    public final static String JSON_KEY_BUYPRICEARRAW = "BuyPriceArraw";            // 是否需要箭头，默认0需要，1不需要
    public final static String JSON_KEY_SELLPRICEARRAW = "SellPriceArraw";            // 是否需要箭头，默认0需要，1不需要

    public final static String JSON_KEY_ASPOSITION = "asPosition";            //安卓特有行情右下角的小符号   仓位的盈亏状态  0 平 1 涨 -1跌  2无仓位
    public final static String JSON_KEY_STARTTIME = "StartTime";            // 服务器返回啥就传啥
    public final static String JSON_KEY_ENDTIME = "EndTime";            // 服务器返回啥就传啥
    public final static String JSON_KEY_MARGININITIAL = "MarginInitial_";            //初始保证金
    public final static String JSON_KEY_SUBSYMBOLNAME = "SubSymbolName";            //六个字母的大写名称  例 USAJPY
    public final static String JSON_KEY_CURPRICE = "CurPrice";            // 中间价
    public final static String JSON_KEY_DIFF = "Diff";            // 点差
    public final static String JSON_KEY_HIGHPRICE = "HighPrice";            // 最高价
    public final static String JSON_KEY_LOWPRICE = "LowPrice";            // 最低价
    public final static String JSON_KEY_RISE = "Rise";            // 涨幅
    public final static String JSON_KEY_PERCENT = "Percent";            // 百分比
    public final static String JSON_KEY_CURPRICEMAP = "CurPrice_Map";           // 中间价全部

    public final static String JSON_KEY_LONGSWAP = "LongSwap_";                // 长仓利息 买利率
    public final static String JSON_KEY_SHORTSWAP = "ShortSwap_";                // 短仓利息 卖利率
    public final static String JSON_KEY_DEALTYPE = "DealType";                // 成交原因
    public final static String JSON_KEY_DEALID = "DealId";                // 当日成交中的orderID
    public final static String JSON_KEY_DEALPRICE = "DealPrice";                // 成交价格
    public final static String JSON_KEY_OPENTIME_ = "OpenTime_";                //开仓时间
    public final static String JSON_KEY_CLOSETIME_ = "CloseTime_";                // 平仓时间
    public final static String JSON_KEY_OPENID = "OpenId";                // 开仓单号
    public final static String JSON_KEY_CLOSEID = "CloseId";                // 平仓单号

    /*******                  合约属性              *********/
    public final static String JSON_KEY_SOURCE = "Source";                //
    public final static String JSON_KEY_BASECURRENCY = "BaseCurrency";                //基础货币
    public final static String JSON_KEY_PROFITCURRENCY = "ProfitCurrency";                //盈亏货币
    public final static String JSON_KEY_POSMAX = "PositionMax";                //持仓上限
    public final static String JSON_KEY_MARGINHEDGED = "MarginHedged";                // 鎖倉保百分比
    public final static String JSON_KEY_HOLIDAYMARGININITIAL = "HolidayMarginInitial";        // 假日初始保證金
    public final static String JSON_KEY_THREEDAYSSWAP = "ThreeDaysSwap";                //3倍利息日
    public final static String JSON_KEY_SETTLENTIME = "SettlenTime";                //结算时间
    public final static String JSON_KEY_EXPIRETIME = "ExpireTime";               //
    public final static String JSON_KEY_TRADETIME = "TradeTime";                //交易时间

    /*******                  层级保证金              *********/
    public final static String JSON_KEY_SYMOLID = "SymbolID";        //
    public final static String JSON_KEY_MARGINMAINTENANCE = "MarginMaintenance";        //
    public final static String JSON_KEY_MARGINSTOPOUT = "MarginStopout";        //
    public final static String JSON_KEY_SPECIALMARGININITIAL = "SpecialMarginInitial_";
    public final static String JSON_KEY_SPECIALMARGINTENANCE = "SpecialMarginMaintenance";
    public final static String JSON_KEY_SPECIALMARGINSTOPOUT = "SpecialMarginStopout";
    public final static String JSON_KEY_SPECIALMARGINHEDGED = "SpecialMarginHedged";       // 鎖倉保百分比
    public final static String JSON_KEY_HOLIDAYMARGINTENANCE = "HolidayMarginMaintenance";
    public final static String JSON_KEY_HOLIDAYMARGINSTOPOUT = "HolidayMarginStopout";
    public final static String JSON_KEY_HOLIDAYMARGINHEDGED = "HolidayMarginHedged";       // 鎖倉保百分比
    public final static String JSON_KEY_CREATEUSERID = "CreateUserID";
    public final static String JSON_KEY_CREATETIME = "CreateTime";
    public final static String JSON_KEY_MODITIME = "ModiTime";
    public final static String JSON_KEY_MODIUSERID = "ModiUserID";
    public final static String JSON_KEY_STATUS = "Status";
    public final static String JSON_KEY_RESERVE = "Reserve1";
    /*******                  层级保证金              *********/

    /**
     * UI层自己使用的key值
     */

    public final static String JSON_KEY_PROPERTY_LOTS = "property_lots";      //手数字段
    public final static String JSON_KEY_PROPERTY_MARGIN = "property_margin";      //初始保证金字段
    public final static String JSON_KEY_PROPERTY_HOLIDAYMARGIN = "property_holidaymargin";      //假期保证金字段
    public final static String JSON_KEY_PROPERTY_UP_MARGIN = "property_up_margin";      //初始保证金展开
    public final static String JSON_KEY_PROPERTY_UP_HOLIDAYMARGIN = "property_up_holidaymargin";   //假期保证金展开

    public final static String JSON_KEY_POSITION_TOTAL_PROFITS = "position_total_profits"; // 总盈亏
    public final static String JSON_KEY_POSITION_TOTAL_BUY_LOTS = "position_total_buy_lots"; // 总买手
    public final static String JSON_KEY_POSITION_TOTAL_BUY_PROFITS = "position_total_buy_profits"; // 总买入盈利
    public final static String JSON_KEY_POSITION_TOTAL_SELL_LOTS = "position_total_sell_lots"; // 总卖手
    public final static String JSON_KEY_POSITION_TOTAL_SELL_PROFITS = "position_total_sell_profits"; // 总卖出盈利
}
